import { Entity, Column,CreateDateColumn,UpdateDateColumn, PrimaryGeneratedColumn } from 'typeorm';
import { ApiProperty } from '@nestjs/swagger';

@Entity('sys_role')
export class Roles {
    @ApiProperty({
        description: 'role_id',
        default: null,
        type: 'BigInt',
        example: 1,
        required: false,
    })
    @PrimaryGeneratedColumn()
    role_id: bigint;
    @ApiProperty({
        description: '角色名称',
        default: null,
        type: 'String',
        example: '1234',
        required: true,
    })
    @Column()
    role_name: string;
    @ApiProperty({
        description: 'role_code',
        default: null,
        type: 'String',
        example: '1234',
        required: true,
    })
    @Column()
    role_code: string;
     @ApiProperty({
        description: 'role_sort',
        default: null,
        type: 'number',
        example: 1,
        required: true,
    })
    @Column()
    role_sort: number;
     @ApiProperty({
        description: 'status状态：用于是否可以启用',
        default: null,
        type: 'number',
        example:1,
        required: true,
    })
    @Column()
    status: number;
    @Column('simple-json')
    menu: any[];
//     @Column({nullable: false})
//     @ApiProperty({
//         description: 'create_by：创建人',
//         default: '',
//         type: 'string',
//         example:'',
//         required: true,
//     })
//     create_by: string;
//     @Column({
//         nullable: false
//     })
//    @ApiProperty({
//         description: 'update_by：更新人',
//         default: '',
//         type: 'string',
//         example:'',
//         required: true,
//     })
//     update_by: string;

}